package com.ruoyi.ctcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceRiskReportMapper;
import com.ruoyi.ctcx.domain.TbInsuranceRiskReport;
import com.ruoyi.ctcx.service.ITbInsuranceRiskReportService;

/**
 * 保险风控报告Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-22
 */
@Service
public class TbInsuranceRiskReportServiceImpl implements ITbInsuranceRiskReportService 
{
    @Autowired
    private TbInsuranceRiskReportMapper tbInsuranceRiskReportMapper;

    /**
     * 查询保险风控报告
     * 
     * @param id 保险风控报告主键
     * @return 保险风控报告
     */
    @Override
    public TbInsuranceRiskReport selectTbInsuranceRiskReportById(Long id)
    {
        return tbInsuranceRiskReportMapper.selectTbInsuranceRiskReportById(id);
    }

    /**
     * 查询保险风控报告列表
     * 
     * @param tbInsuranceRiskReport 保险风控报告
     * @return 保险风控报告
     */
    @Override
    public List<TbInsuranceRiskReport> selectTbInsuranceRiskReportList(TbInsuranceRiskReport tbInsuranceRiskReport)
    {
        return tbInsuranceRiskReportMapper.selectTbInsuranceRiskReportList(tbInsuranceRiskReport);
    }

    /**
     * 新增保险风控报告
     * 
     * @param tbInsuranceRiskReport 保险风控报告
     * @return 结果
     */
    @Override
    public int insertTbInsuranceRiskReport(TbInsuranceRiskReport tbInsuranceRiskReport)
    {
        tbInsuranceRiskReport.setCreateTime(DateUtils.getNowDate());
        return tbInsuranceRiskReportMapper.insertTbInsuranceRiskReport(tbInsuranceRiskReport);
    }

    /**
     * 修改保险风控报告
     * 
     * @param tbInsuranceRiskReport 保险风控报告
     * @return 结果
     */
    @Override
    public int updateTbInsuranceRiskReport(TbInsuranceRiskReport tbInsuranceRiskReport)
    {
        tbInsuranceRiskReport.setUpdateTime(DateUtils.getNowDate());
        return tbInsuranceRiskReportMapper.updateTbInsuranceRiskReport(tbInsuranceRiskReport);
    }

    /**
     * 批量删除保险风控报告
     * 
     * @param ids 需要删除的保险风控报告主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceRiskReportByIds(Long[] ids)
    {
        return tbInsuranceRiskReportMapper.deleteTbInsuranceRiskReportByIds(ids);
    }

    /**
     * 删除保险风控报告信息
     * 
     * @param id 保险风控报告主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceRiskReportById(Long id)
    {
        return tbInsuranceRiskReportMapper.deleteTbInsuranceRiskReportById(id);
    }
}
